<template>
<!-- 搜索页面 -->
  <div class="container">
    <common-header :title="title"></common-header>
    <!-- 搜索框 -->
    <search-input @searchData="searchData"></search-input>
    <!-- 滚动区域 -->
    <search-scroll-wrapper :searchData="searchInfo"></search-scroll-wrapper>
  </div>
</template>

<script>
import CommonHeader from '@/components/Header/Common.vue'
import SearchInput from '@/components/SearchInput/index.vue'
import SearchScrollWrapper from '@/components/ScrollWrapper/Search.vue'

export default {
  name: 'Search',
  data() {
    return {
      title: '商家搜索',
      searchInfo: {}
    }
  },
  components: {
    CommonHeader,
    SearchInput,
    SearchScrollWrapper
  },
  methods: {
    searchData (res) {
      if(res) {
        this.searchInfo = res;
      }
    }
  }
}
</script>

<style lang="scss" scoped>
.container {
  height: 100%;
}
</style>